<!--#include("_tool_header.html")-->
    <!--%import("./filter/insert_blogapi.xml")-->

			<!-- Content -->
			<div id="content">
				
				<!-- contentHeader -->
				<div class="contentHeader publishHeader lineBottom">
					<h3 class="h3">{$lang->textyle_second_menus[5]['dispTextyleToolConfigBlogApi']}</h3>
				</div>
				<!-- /contentHeader -->

                <div class="listHeader">
                    <p class="info">{$lang->about_blog_api}</p>
                </div>

				<div class="setUp">
                    <!--@if($type == 'registration')-->
                    <script type="text/javascript">
                        var _msg = new Array('{implode('\',\'',$lang->msg_blogapi_registration)}');
                    </script>
					<form action="./" method="post" onsubmit="<!--@if($api_info->api_srl)-->return procFilter(this,insert_blogapi)<!--@else-->doGetSiteInfo(); return false;<!--@end-->" id="foBlogApi">
					<input type="hidden" name="mid" value="{$mid}" />
					<input type="hidden" name="api_srl" value="{$api_info->api_srl}" />
						<fieldset>
                            <!--@if($api_info->api_srl)-->
                            {@$hide_class = ''}
							<h4 class="h4">{$lang->cmd_modification_blogapi}</h4>
                            <!--@else-->
                            {@$hide_class = ' class="hide"'}
							<h4 class="h4">{$lang->cmd_registration_blogapi}</h4>
                            <!--@end-->
							<table border="1" cellspacing="0" class="setupData">
								<tr>
									<th scope="row" rowspan="2"><label for="site_url">{$lang->blogapi_site_url}</label></th>
									<td>
                                        <input name="blogapi_site_url" type="text" class="inputText" id="site_url" value="{htmlspecialchars($api_info->blogapi_site_url)}" style="width:400px" />
                                        <!--@if(!$api_info->api_srl)--><span class="buttonGray medium getinfo"><button type="button" onclick="doGetSiteInfo(); return false;">{$lang->cmd_get_site_info}</button></span><!--@end-->
                                    </td>
								</tr>
								<tr>
									<td>{$lang->about_blogapi_site_url}</td>
								</tr>
								<tr{$hide_class}>
									<th scope="row" rowspan="2"><label for="site_title">{$lang->blogapi_site_title}</label></th>
									<td>
                                        <input name="blogapi_site_title" type="text" class="inputText" id="site_title" value="{htmlspecialchars($api_info->blogapi_site_title)}" style="width:400px" />
                                    </td>
								</tr>
								<tr{$hide_class}>
									<td>{$lang->about_blogapi_site_title}</td>
								</tr>
								<tr{$hide_class}>
									<th scope="row" rowspan="2"><label for="api_url">{$lang->blogapi_url}</label></th>
									<td>
                                        <input name="blogapi_url" type="text" class="inputText" id="api_url" value="{htmlspecialchars($api_info->blogapi_url)}" style="width:400px" />
                                    </td>
								</tr>
								<tr{$hide_class}>
									<td>{$lang->about_blogapi_url}</td>
								</tr>
								<tr{$hide_class}>
									<th scope="row" rowspan="2"><label for="blogapi_userid">{$lang->user_id}</label></th>
									<td><input name="blogapi_user_id" type="text" class="inputText" id="blogapi_userid" value="{htmlspecialchars($api_info->blogapi_user_id)}" style="width:200px" /></td>
								</tr>
								<tr{$hide_class}>
									<td>{$lang->about_blogapi_user_id}</td>
								</tr>
								<tr{$hide_class}>
									<th scope="row" rowspan="2"><label for="blogapi_password">{$lang->password}</label></th>
									<td>
                                        <input name="blogapi_password" type="password" class="inputText" id="blogapi_password" value="{htmlspecialchars($api_info->blogapi_password)}" style="width:200px" />
                                    </td>
								</tr>
								<tr{$hide_class}>
									<td>{$lang->about_blogapi_password}</td>
								</tr>
                                <tr{$hide_class}>
                                    <td colspan="2">
                                        <!--@if($api_info->api_srl)-->
                                        <span class="buttonGray medium"><button type="submit" >{$lang->cmd_modify}</button></span>
                                        <!--@else-->
                                        <span class="buttonGray medium"><button type="submit" >{$lang->cmd_registration}</button></span>
                                        <!--@end-->
                                    </td>
                                </tr>
                            </table>
						</fieldset>
					</form>

                    <!--@else-->

					<table class="tableData" cellspacing="0" border="1" summary="Api List">
						<thead>
							<tr>
								<th scope="col">{$lang->blogapi_site_url}</th>
								<th scope="col">{$lang->blogapi_url}</th>
								<th scope="col">{$lang->blogapi_type}</th>
								<th scope="col">{$lang->regdate}</th>
								<th scope="col">{$lang->cmd_setup}</th>
							</tr>
						</thead>
						<tbody>
                            <!--@foreach($textyle->getApis() as $key => $val)-->
							<tr>
								<th scope="row"><a href="{$val->blogapi_site_url}" onclick="window.open(this.href);return false;">{$val->blogapi_site_title}</a></th>
								<td><a href="{$val->blogapi_url}" onclick="window.open(this.href); return false;">{$val->blogapi_url}</a></td>
								<td>{$val->blogapi_type}</td>
								<td>{zdate($val->regdate, 'Y-m-d')}</td>
								<td>
                                    <!--@if($val->enable == 'Y')-->
                                        {@$iconClass = 'buttonActive'}
                                    <!--@else-->
                                        {@$iconClass = 'buttonDisable'}
                                    <!--@end-->
                                    <a href="#" onclick="doToggleAPI(this,'{$val->api_srl}');return false;" class="buttonSet {$iconClass}"><span>{$lang->use}</span></a>
                                    <a href="{getUrl('type','registration','api_srl',$val->api_srl)}" class="buttonSet buttonSetting"><span>{$lang->cmd_modify}</span></a>
                                    <a href="#" onclick="if(confirm('{$lang->msg_remove_api}')) doRemoveApi({$val->api_srl});return false;" class="buttonSet buttonDelete"><span>{$lang->cmd_delete}</span></a>
                                </td>
							</tr>
                        <!--@end-->
						</tbody>
					</table>
                    <div class="buttonArea">
                        <span class="buttonAction actionBlue"><input type="button" onclick="location.href=current_url.setQuery('type','registration').setQuery('api_srl','');return false;" value="{$lang->cmd_registration}" /></span>
                    </div>

                    <!--@end-->
				</div>

			</div>
			<hr />
			<!-- /Content -->
				
			<!-- Extension -->
				<!--#include("_tool_menu.html")-->
			<!-- Extension -->

<!--#include("_tool_footer.html")-->
